import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App'
import router from './router'
import { userInfoAPI } from './api/index'
import globalFunc from '@/assets/global/global_func'

Vue.use(globalFunc);

Vue.use(ElementUI)
Vue.config.productionTip = false

userInfoAPI.getUserInfo({}, (data) => {
	if (data && data.uid) {
		new Vue({
			data: {
				uid: data.uid,
				username: data.name,
				email: data.email,
			},
			el: '#app',
			router,
			template: '<App/>',
			components: { App }
		})
   }
})

